import Vue from "vue";
import VueRouter, { RouteConfig } from "vue-router";
Vue.use(VueRouter);

// 导入views组件
const Login = () => import(/* webpackChunkName: "login" */ "@/views/Login.vue");

// 路由配置
const routes: Array<RouteConfig> = [
  {
    path: "/",
    redirect: "/login",
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  },
];

// 创建路由对象
const router = new VueRouter({
  routes,
});

export default router;
